<div class="centerbig_modal_form" style="width:700px;">
      <div class="center_top" style="width:700px;">
        <span class="center_top_title"><?php echo $this->translate("editCustomerTitle"); ?></span>
        <div class="centerbig_modal_btn_div" onclick="javascript:Customer.deleteCustomer('<?php echo HttpUtil::baseUrl();?>/customer/customer/delete/id/<?php echo $this->id; ?>')">
            <div class="dbgrid_form_btn_pic">
                 <img src="<?php echo HttpUtil::baseUrl();?>/images/delete.gif"/>
            </div>
            <div class='center_form_btn_text'><?php echo $this->translate("delBtn"); ?></div>
        </div>
      </div>
     <input type="hidden" id="baseurl" value="<?php echo HttpUtil::baseUrl(); ?>"/> 
     <input type="hidden" id="iniUserType" value="<?php echo $this->userType; ?>" />
     <input type="hidden" id="userTypeChangeInfo1" value="<?php echo $this->translate('userTypeChangeInfo1'); ?> " />
     <input type="hidden" id="userTypeChangeInfo2" value="<?php echo $this->translate('userTypeChangeInfo2'); ?> " />
     
     <input type="hidden" id="nameEmpty" value="<?php echo $this->translate("nameEmpty"); ?>"/>
     <input type="hidden" id="nameExist" value="<?php echo $this->translate("nameExist"); ?>"/> 
     <input type="hidden" id="emailEmpty" value="<?php echo $this->translate("emailEmpty"); ?>"/>
     <input type="hidden" id="emailErr" value="<?php echo $this->translate("emailErr"); ?>"/> 
     <input type="hidden" id="emailExist" value="<?php echo $this->translate("emailExist"); ?>"/> 
     <input type="hidden" id="pswErr" value="<?php echo $this->translate("pswErr"); ?>"/> 
     
     <input type="hidden" id="teamNameEmpty" value="<?php echo $this->translate("teamNameEmpty"); ?>"/> 
     <input type="hidden" id="fullNameEmpty" value="<?php echo $this->translate("fullNameEmpty"); ?>"/>
     <input type="hidden" id="provinceEmpty" value="<?php echo $this->translate("provinceEmpty"); ?>"/>
     <input type="hidden" id="cityEmpty" value="<?php echo $this->translate("cityEmpty"); ?>"/>
     <input type="hidden" id="addrEmpty" value="<?php echo $this->translate("addrEmpty"); ?>"/>
     <input type="hidden" id="zipEmpty" value="<?php echo $this->translate("zipEmpty"); ?>"/> 
     <input type="hidden" id="mobileEmpty" value="<?php echo $this->translate("mobileEmpty"); ?>"/> 
     <input type="hidden" id="mobileErr" value="<?php echo $this->translate("mobileErr"); ?>"/> 
     <input type="hidden" id="pointsBuyerErr" value="<?php echo $this->translate("pointsBuyerErr"); ?>"/> 
     <input type="hidden" id="pointsSellerErr" value="<?php echo $this->translate("pointsSellerErr"); ?>"/>
     <input type="hidden" id="pointsBuyerTotalErr" value="<?php echo $this->translate("pointsBuyerTotalErr"); ?>"/> 
     <input type="hidden" id="pointsSellerTotalErr" value="<?php echo $this->translate("pointsSellerTotalErr"); ?>"/>
     <input type="hidden" id="editPromptInfo" value="<?php echo $this->translate("editPromptInfo"); ?>"/>
     <input type="hidden" id="delPromptInfo"  value="<?php echo $this->translate("delPromptInfo"); ?>"/>
      
      
      <div class="centerbig_modal_content">
            <form action="<?php echo $this->form->getAction(); ?>" method="post" id="customerForm" name="customerForm">
                <div class="left_nav_div" style="height:100px;">
                    <div class="left_nav_item_cur" id="left_nav0" onclick="javascript:LeftNav.changeDiv(0,5)"><?php echo $this->translate("editCusNav1"); ?></div>
                    <?php if($this->userType==3 && !empty($this->accountAgent)){?>
                         <div class="left_nav_item" id="left_nav1" onclick="javascript:LeftNav.changeDiv(1,5)"><?php echo $this->translate("agentAccountInfo"); ?></div>
                    <?php } ?>
                    <div class="left_nav_item" id="left_nav2" onclick="javascript:LeftNav.changeDiv(2,5)"><?php echo $this->translate("wishlists"); ?></div>
                    <!--<div class="left_nav_item" id="left_nav2" onclick="javascript:LeftNav.changeDiv(2,5)"><?php echo $this->translate("editCusNav3"); ?></div>
                    <div class="left_nav_item" id="left_nav3" onclick="javascript:LeftNav.changeDiv(3,5)"><?php echo $this->translate("editCusNav4"); ?></div>
                    <div class="left_nav_item" id="left_nav4" onclick="javascript:LeftNav.changeDiv(4,5)"><?php echo $this->translate("editCusNav5"); ?></div>
                -->
                </div>
                <div class="centerbig_right_nav" id="right_content_div0">
                    <?php echo ZendFormUtil::renderElement($this->form->id); ?>
                    <?php ZendFormUtil::renderElement($this->form->name); ?>
                    <?php ZendFormUtil::renderElement($this->form->email); ?>
                    <?php ZendFormUtil::renderElement($this->form->userType); ?>
                    <?php 
                        if(isset($this->campus)){
                        	$campus = $this->campus;
                        } else {
                        	$campus = '';
                        }
                    ?>
                    <div class="form_line_div">
                    <div class="form_element_label"><?php echo $this->translate("belongHighSchool"); ?></div>
                    <div class="form_element">
                         <input id="campusesName"  readonly onclick="javascript:Popup.showAllCampuses()" value="<?php echo $campus ?>" />
                         <input id="campusesID" name="campusesID" type="hidden" value="<?php echo $this->campusId; ?>" />
                         <input type="button" value="<?php echo $this->translate('clearSchool'); ?>" onclick="javascript:Popup.clearCampuses()" />
                    </div>
                    </div>
                    <div class="clear"></div>
                    <div class="form_line_div">
                         <div id="deputyErroMsg" class="form_element_error"></div>
                    </div>
                    <div class="clear"></div>
                    
                    <?php ZendFormUtil::renderElement($this->form->status); ?>
                    <?php ZendFormUtil::renderElement($this->form->pointsBuyer); ?>
                   
                    <?php ZendFormUtil::renderElement($this->form->pointsBuyerTotal); ?>
                   
                    <?php ZendFormUtil::renderElement($this->form->customerRank); ?>
                    <?php ZendFormUtil::renderElement($this->form->lastIp); ?>
                    <?php ZendFormUtil::renderElement($this->form->lastLogin); ?> 
                    <?php ZendFormUtil::renderElement($this->form->password); ?>
                    
                    <div class="form_line_div">
                        <div class="form_element_label">&nbsp;</div>
                        <div class="form_element">
                            <label><?php echo $this->translate("passwordPromptInfo");?></label>
                        </div>
                    </div>
                    <div class="clear"></div> 
                    
                    <div id="receiveAddrInfo" style="margin-top:10px; ">
                        <div style="margin-left:20px;font-weight:bold;"><?php echo $this->translate("receiveAddr");?>:</div>
                        <div style="margin-top:10px;" >
                          <?php ZendFormUtil::renderElement($this->form->teamName); ?>
                          <?php ZendFormUtil::renderElement($this->form->fullName); ?>
                          <?php ZendFormUtil::renderElement($this->form->province); ?>
                          <?php ZendFormUtil::renderElement($this->form->city); ?>
                          <?php ZendFormUtil::renderElement($this->form->receiveAddr); ?>
                          <?php ZendFormUtil::renderElement($this->form->zipCode); ?>
                          <?php ZendFormUtil::renderElement($this->form->mobile); ?>
                          <?php ZendFormUtil::renderElement($this->form->phone); ?>
                        </div>
                    </div>        
                </div>
                <div class="centerbig_right_nav" id="right_content_div1" style="display:none;">
                    <div class="form_line_div" style="margin-top:10px;">
                        <div class="form_element_label"><?php echo $this->translate('accountBalance');?>:</div>
                        <div class="form_element"> <?php echo $this->accountAgent['balance'];?></div>
                    </div>
                    <div class="clear"></div>
                    <div class="form_line_div">
                        <div class="form_element_label"><?php echo $this->translate('debtTotal');?>:</div>
                        <div class="form_element"> <?php echo $this->accountAgent['debt_total'];?></div>
                    </div>
                    <div class="clear"></div>
                    <div class="form_line_div">
                        <div class="form_element_label"><?php echo $this->translate('debtBalance');?>:</div>
                        <div class="form_element"> <?php echo $this->accountAgent['debt_balance'];?></div>
                    </div>
                    <div class="clear"></div>
                    <div class="form_line_div">
                        <div class="form_element_label"><?php echo $this->translate('usageBalance');?>:</div>
                        <div class="form_element"> <?php echo $this->accountAgent['usage_balance'];?></div>
                    </div>
                    <div class="clear"></div>
                    <div class="form_line_div">
                        <div class="form_element_label"><?php echo $this->translate('freezedBalance');?>:</div>
                        <div class="form_element"> <?php echo $this->accountAgent['freezed_balance'];?></div>
                    </div>
                    <div class="clear"></div>
                </div>
                
                <div class="centerbig_right_nav" id="right_content_div2" style="display:none;">
                   <div style="margin:20px;">
                        <table cellspacing="0" cellpadding="0"  width="100%" >
                            <thead>
                                <tr>
                                   <td class="dbgrid_th" style="border-top:1px solid #CCCCCC;border-left:1px solid #CCCCCC" align="center" ><?php echo $this->translate('productImage');?></td>
                                    <td class="dbgrid_th" style="border-top:1px solid #CCCCCC"   align="center" ><?php echo $this->translate('productTitle');?></td>
                                    <td class="dbgrid_th" style="border-top:1px solid #CCCCCC;border-right:1px solid #CCCCCC;"  align="center"  ><?php echo $this->translate('cutomerComment');?></td>
                                </tr> 
                            </thead>
                            <tbody id="wishlist">
                                <?php 
                                if(!empty($this->customerWishlists)){
                                	$path = Zend_Registry::get("private_image_domain_path");// $path = "//pi.akimimi.com/p";
                                	$size = "_60.jpg";
                                    foreach($this->customerWishlists as $wishList){
                                    	if(!empty($wishList['name']) && !empty($wishList['folder'])){
                                    		$imageHtml = "<img width='60' height='60' src='".$path.$wishList['folder'].$wishList['name'].$size."' alt='' />";
                                    	} else {
                                    		$imageHtml = "<div style='vertical-align:middle;'>".$this->translate("productNoImage")."</div";
                                    	}
                                ?>
                                    <tr>
                                        <td class="dbgrid_td" style="border-left:1px solid #CCCCCC"   align="center" ><?php echo $imageHtml;?></td>
                                        <td class="dbgrid_td"   align="center" ><?php echo $wishList['title'];?></td>
                                        <td class="dbgrid_td" style="border-right:1px solid #CCCCCC" ><?php echo $wishList['comment'];?></td>
                                    </tr>    
                                <?php } ?><!--
                                    <tr>
                                        <td colspan="3" align="center" >
                                        <div style="margin-top:5px;float:right;" >
                                        <?php 
                                        $paginate = $this->paginate;
                                        for($i=1;$i<=$paginate['page_num'];$i++){
                                           if($i == $paginate['cur_page']){
                                           	  $class = "class='dbgrid_page_item_current'";
                                           	  $clickAction = "";
                                           } else {
                                           	  $class = "class='dbgrid_page_item'"; 
                                           	  $clickAction = "onclick='javascript:Customer.paginateWishlist(\"".HttpUtil::baseUrl()."\",".$i.",".$this->id.")'";
                                           }
                                        ?>
                                           <span <?php echo $class.' '.$clickAction;?> ><?php echo $i;?></span>
                                        <?php }?>
                                        </div>
                                        </td>
                                    </tr>
                               --><?php  } ?>
                            </tbody>
                         </table>
                    </div>
                </div>
            </form>
      </div>
      <div class='clear'></div>
      <div class="centerbig_modal_button_center">
          <input type="button" name="save" value="<?php echo $this->translate("saveBtn"); ?>"  onclick="javascript:Customer.editCustomer('<?php echo HttpUtil::baseUrl();?>');" />
          <input type="button" name="cancel" value="<?php echo $this->translate("cancelBtn"); ?>" onclick="javascript:Common.closeDialog('customerDialog');" />
      </div>
      <div class='clear'></div>
      <!-- all school info start -->
    <?php
    $province = $this->province;
    $campuses = $this->campuses;
    ?>
    <div class="allSchool" id="allSchool" style="display:none; top:130px;">
        <div id="city" class="city">
            <?php
            for($i = 0; $i < count($province); $i++) {
                ?>
            <span id="title_<?php echo $i;?>" style="background-color: rgb(255, 255, 255);"><a href="javascript:Popup.showArea(<?php echo $province[$i]["id"]; ?>)"><?php echo $province[$i]["title"]; ?></a></span>
            <?php } ?>
        </div>
        <div id="area" class="area">
            <ul id="allCampuses">
                <?php
                foreach ($campuses as $name) {
                    ?>
                <li><a href="javascript:Popup.viewAreaCampus('<?php echo $name["area_name"];?>', '<?php echo $name["id"];?>');"><?php echo $name["area_name"];?></a></li>
                <?php } ?>
            </ul>

        </div>
        <div style="margin-left:400px;">
            <input name="button" type="button" value="关闭" onClick="Popup.closeBtn();" />
        </div>
    </div>
    <!-- all school info end -->
</div>
<script type="text/javascript" language="javascript">
    $(document).ready(function(){
         Customer.changeType();
    });
</script>
